/*
 * @Author: your name
 * @Date: 2021-11-30 11:02:50
 * @LastEditTime: 2021-12-13 09:10:12
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \express-app\mongoose\db.js
 */
const mongoose = require('mongoose');
let mongoDB_url = 'mongodb://localhost/test';
mongoose.connect(mongoDB_url, (err) => {
  //disconnect()
  if (err) {
    console.log(err);
    return;
  }
  console.log('数据库服务器连接成功');
});

module.exports = mongoose;
